package com.kaishengit.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kaishengit.dao.GoodsDao;
import com.kaishengit.pojo.Goods;
@Service
@Transactional
public class GoodsService {
	private GoodsDao goodsDao;
	public void add(Goods goods){
		goodsDao.add(goods);
		
	}
	public void edit(Goods goods){
		goodsDao.edit(goods);
	}
	public Goods findById(String id){
		
		return goodsDao.findById(id);
	}
	public List<Goods> findAll(){
		return goodsDao.findAll();
	}
	public void del(String id) {
		goodsDao.del(id);
		
	}

	@Autowired
	public void setGoodsDao(GoodsDao goodsDao) {
		this.goodsDao = goodsDao;
	}
	

}
